package com.trust.entity.VO;

import com.trust.agri.sign.validate.SaveValidate;
import com.trust.agri.sign.validate.UpdateValidate;
import com.trust.entity.FarmSeedConsumable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author ccc
 * @desc
 * @since 2023/11/15 10:35
 */
@Data
@ApiModel("育苗vo")
public class FarmSeedVO {

    @ApiModelProperty("id")
    @Null(message = "id 只能为空", groups = {SaveValidate.class})
    @NotNull(message = "id 不能为空", groups = {UpdateValidate.class})
    private Integer id;

   /* @ApiModelProperty("作物当前进度")
    @NotNull(message = "作物当前进度 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private BigDecimal cropProgress;

    @ApiModelProperty("作物生长周期")
    @NotNull(message = "作物生长周期 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private BigDecimal growthCycle;*/

    @ApiModelProperty("种子数量")
    @NotNull(message = "种子数量 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private BigDecimal breedNum;

    @ApiModelProperty("种植标识")
    @NotBlank(message = "种植标识 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String plantSign;

    @ApiModelProperty("种植面积")
    @NotNull(message = "种植面积 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private BigDecimal plantArea;

    @ApiModelProperty("种植地块")
    @NotEmpty(message = "种植地块 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private List<Integer> landId;

    @ApiModelProperty(value = "种植地块对象", allowEmptyValue = true)
    private List<DictionaryVO> landObj;

    @ApiModelProperty("种植批号")
    @NotBlank(message = "种植批号 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String code;

    @ApiModelProperty("种植开始时间")
    @NotNull(message = "种植开始时间 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Date plantStart;

    @ApiModelProperty("种植品类")
    @NotNull(message = "种植品类 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer categoryId;

    @ApiModelProperty(value = "种植品类名称", allowEmptyValue = true)
    private String categoryName;

    @ApiModelProperty("负责人")
    @NotBlank(message = "负责人 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer principal;

    @ApiModelProperty("负责人名称")
    private String principalName;

    @ApiModelProperty("记录人")
    @NotNull(message = "记录人 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer recoder;

    @ApiModelProperty("记录人名称")
    private String recorderName;

    @ApiModelProperty(value = "辅助育苗设施", allowEmptyValue = true)
    private Integer seedFacilityId;

    @ApiModelProperty(value = "辅助育苗设施名称")
    @NotBlank(message = "辅助育苗设施 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String seedFacilityName;

    @ApiModelProperty("辅助育苗设施")
    private List<DictionaryVO> seedFacilityList;

    @ApiModelProperty("育苗数量")
    @NotNull(message = "育苗数量 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer seedNum;

    @ApiModelProperty(value = "种源信息")
    @NotNull(message = "种源信息 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer breedId;

    @ApiModelProperty(value = "种源信息名称", allowEmptyValue = true)
    private String breedName;

    @ApiModelProperty("种源批号")
    @NotNull(message = "种源批号 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer breedCode;

    @ApiModelProperty(value = "种源批号名称", allowEmptyValue = true)
    private String breedCodeName;

  /*  @ApiModelProperty("在茬作物")
    @NotBlank(message = "在茬作物 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String stubbleCrop;*/

    @ApiModelProperty("作业描述")
    @NotBlank(message = "作业描述 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String workDetail;

    @ApiModelProperty("作业班组")
    @NotNull(message = "作业班组 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer workGroupId;

    @ApiModelProperty(value = "作业班组名称", allowEmptyValue = true)
    private String workGroupName;

    @ApiModelProperty(value = "作业图片", allowEmptyValue = true)
    private String workPic;

    @ApiModelProperty("作业时间-开始 ")
    @NotNull(message = "作业时间-开始 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Date workStart;

    @ApiModelProperty("作业时间-结束")
    @NotNull(message = "作业时间-结束 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Date workEnd;

    @ApiModelProperty("用工人数")
    @NotNull(message = "用工人数 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer workerNum;

    @ApiModelProperty(value = "作业耗材", allowEmptyValue = true)
    private List<FarmSeedConsumable> consumableList;

    @ApiModelProperty(value = "状态 1进行中，2已结束", allowEmptyValue = true)
    private Integer state;

    @ApiModelProperty(value = "育苗方式", allowEmptyValue = true)
    private Integer type;

    @ApiModelProperty(value = "育苗方式名称", allowEmptyValue = true)
    @NotBlank(message = "育苗方式 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String typeName;

    @ApiModelProperty("地块标识颜色")
    @NotBlank(message = "地块标识颜色 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String color;
}
